using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;

namespace ILRuntime.Runtime.Generated
{
    unsafe class mb_iOS_MyCollectionView_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(mb.iOS.MyCollectionView);

            field = type.GetField("MyScrolled", flag);
            app.RegisterCLRFieldGetter(field, get_MyScrolled_0);
            app.RegisterCLRFieldSetter(field, set_MyScrolled_0);
            field = type.GetField("MyItemSelected", flag);
            app.RegisterCLRFieldGetter(field, get_MyItemSelected_1);
            app.RegisterCLRFieldSetter(field, set_MyItemSelected_1);
            field = type.GetField("MyGetItemsCount", flag);
            app.RegisterCLRFieldGetter(field, get_MyGetItemsCount_2);
            app.RegisterCLRFieldSetter(field, set_MyGetItemsCount_2);
            field = type.GetField("MyGetCell", flag);
            app.RegisterCLRFieldGetter(field, get_MyGetCell_3);
            app.RegisterCLRFieldSetter(field, set_MyGetCell_3);
            field = type.GetField("MyGetMinimumLineSpacingForSection", flag);
            app.RegisterCLRFieldGetter(field, get_MyGetMinimumLineSpacingForSection_4);
            app.RegisterCLRFieldSetter(field, set_MyGetMinimumLineSpacingForSection_4);
            field = type.GetField("MyGetInsetForSection", flag);
            app.RegisterCLRFieldGetter(field, get_MyGetInsetForSection_5);
            app.RegisterCLRFieldSetter(field, set_MyGetInsetForSection_5);
            field = type.GetField("MyGetSizeForItem", flag);
            app.RegisterCLRFieldGetter(field, get_MyGetSizeForItem_6);
            app.RegisterCLRFieldSetter(field, set_MyGetSizeForItem_6);
            field = type.GetField("SectionCount", flag);
            app.RegisterCLRFieldGetter(field, get_SectionCount_7);
            app.RegisterCLRFieldSetter(field, set_SectionCount_7);

            args = new Type[]{typeof(System.Int32)};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_MyScrolled_0(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyScrolled;
        }
        static void set_MyScrolled_0(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyScrolled = (System.Action<mb.iOS.MyCollectionView>)v;
        }
        static object get_MyItemSelected_1(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyItemSelected;
        }
        static void set_MyItemSelected_1(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyItemSelected = (System.Action<mb.iOS.MyCollectionView, Foundation.NSIndexPath>)v;
        }
        static object get_MyGetItemsCount_2(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyGetItemsCount;
        }
        static void set_MyGetItemsCount_2(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyGetItemsCount = (System.Func<mb.iOS.MyCollectionView, System.Int32, System.Int32>)v;
        }
        static object get_MyGetCell_3(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyGetCell;
        }
        static void set_MyGetCell_3(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyGetCell = (System.Func<mb.iOS.MyCollectionView, Foundation.NSIndexPath, mb.iOS.MyCollectionViewCell>)v;
        }
        static object get_MyGetMinimumLineSpacingForSection_4(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyGetMinimumLineSpacingForSection;
        }
        static void set_MyGetMinimumLineSpacingForSection_4(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyGetMinimumLineSpacingForSection = (System.Func<mb.iOS.MyCollectionView, UIKit.UICollectionViewLayout, System.Int32, System.Int32>)v;
        }
        static object get_MyGetInsetForSection_5(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyGetInsetForSection;
        }
        static void set_MyGetInsetForSection_5(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyGetInsetForSection = (System.Func<mb.iOS.MyCollectionView, UIKit.UICollectionViewLayout, System.Int32, UIKit.UIEdgeInsets>)v;
        }
        static object get_MyGetSizeForItem_6(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).MyGetSizeForItem;
        }
        static void set_MyGetSizeForItem_6(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).MyGetSizeForItem = (System.Func<mb.iOS.MyCollectionView, UIKit.UICollectionViewLayout, Foundation.NSIndexPath, CoreGraphics.CGSize>)v;
        }
        static object get_SectionCount_7(ref object o)
        {
            return ((mb.iOS.MyCollectionView)o).SectionCount;
        }
        static void set_SectionCount_7(ref object o, object v)
        {
            ((mb.iOS.MyCollectionView)o).SectionCount = (System.Int32)v;
        }

        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @nsec = ptr_of_this_method->Value;


            var result_of_this_method = new mb.iOS.MyCollectionView(@nsec);

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
